home *** CD-ROM | disk | FTP | other *** search
/ AMIGA-CD 2 / Amiga-CD - Volume 2.iso / ungepackte_daten / 1994 / 1 / 01 / e-compiler / e-compiler.ampk / E-Compiler / Sources / Examples / WbArg.e < prev   
Encoding:
Text File  |  1995-06-01  |  443 b   |  16 lines

  1. /* reading the arguments when started from wb.
  2.    give this program a .info file, and shift-select some icons with it. */
  3.  
  4. MODULE 'workbench/startup'
  5.  
  6. PROC main()
  7.   DEF wb:PTR TO wbstartup, args:PTR TO wbarg, a
  8.   IF wbmessage=NIL                /* we got from cli */
  9.     WriteF('args = "\s"\n',arg)
  10.   ELSE                        /* from wb */
  11.     wb:=wbmessage
  12.     args:=wb.arglist
  13.     FOR a:=1 TO wb.numargs DO WriteF('wbarg #\d = "\s"\n',a,args[].name++)
  14.   ENDIF
  15. ENDPROC
  16.